package com.blue.crawler.annotation;

import com.blue.crawler.download.Download;

import java.net.Proxy;
import java.util.List;

public class CrawlerConfig
{
	private String name;
	private Class<?> clazz;
	private Class<?> crawler;
	private int interval;
	private boolean existAndStop;

	private boolean proxy = false;
	private String proxyHost;
	private int proxyPort;
	private Proxy.Type proxyType;

	private boolean download = false;
	private Class<? extends Download> downloadClazz;
	private String root;
	private int thumbHeight;
	private int thumbWidth;
	private int retry = 3;

	private List<CrawlerPathConfig> pathList;

	public CrawlerConfig()
	{
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public Class<?> getClazz()
	{
		return clazz;
	}

	public void setClazz(Class<?> clazz)
	{
		this.clazz = clazz;
	}

	public Class<?> getCrawler()
	{
		return crawler;
	}

	public void setCrawler(Class<?> crawler)
	{
		this.crawler = crawler;
	}

	public int getInterval()
	{
		return interval;
	}

	public void setInterval(int interval)
	{
		this.interval = interval;
	}

	public boolean isExistAndStop()
	{
		return existAndStop;
	}

	public void setExistAndStop(boolean existAndStop)
	{
		this.existAndStop = existAndStop;
	}

	public boolean isProxy()
	{
		return proxy;
	}

	public void setProxy(boolean proxy)
	{
		this.proxy = proxy;
	}

	public String getProxyHost()
	{
		return proxyHost;
	}

	public void setProxyHost(String proxyHost)
	{
		this.proxyHost = proxyHost;
	}

	public int getProxyPort()
	{
		return proxyPort;
	}

	public void setProxyPort(int proxyPort)
	{
		this.proxyPort = proxyPort;
	}

	public Proxy.Type getProxyType()
	{
		return proxyType;
	}

	public void setProxyType(Proxy.Type proxyType)
	{
		this.proxyType = proxyType;
	}

	public boolean isDownload()
	{
		return download;
	}

	public void setDownload(boolean download)
	{
		this.download = download;
	}

	public Class<? extends Download> getDownloadClazz()
	{
		return downloadClazz;
	}

	public void setDownloadClazz(Class<? extends Download> downloadClazz)
	{
		this.downloadClazz = downloadClazz;
	}

	public String getRoot()
	{
		return root;
	}

	public void setRoot(String root)
	{
		this.root = root;
	}

	public int getThumbHeight()
	{
		return thumbHeight;
	}

	public void setThumbHeight(int thumbHeight)
	{
		this.thumbHeight = thumbHeight;
	}

	public int getThumbWidth()
	{
		return thumbWidth;
	}

	public void setThumbWidth(int thumbWidth)
	{
		this.thumbWidth = thumbWidth;
	}

	public int getRetry()
	{
		return retry;
	}

	public void setRetry(int retry)
	{
		this.retry = retry;
	}

	public List<CrawlerPathConfig> getPathList()
	{
		return pathList;
	}

	public void setPathList(List<CrawlerPathConfig> pathList)
	{
		this.pathList = pathList;
	}
}
